
<ui:component xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib"
	xmlns:c="http://java.sun.com/jstl/core">

	<script type="text/javascript">
	  jQuery(function(){
			jQuery("#tabs").tabs().show();
			jQuery("#tabs li").removeClass('ui-corner-top');
		});
	</script>

	<div class="title">
		<h1><h:outputText value="#{messages['title.home']}" /></h1>
		<h:outputText value="#{messages['subtitle.home']}" />
	</div>
	 <div id="quick">
		 <div id="tabs" class="ui-tabs-vertical clearfix">
			<ul>
				<li class="ui-corner-left"><a href="#tabs-1"><span><h:outputText
					value="#{messages['label.accomodation']}" /></span></a></li>
				<li class="ui-corner-left"><a href="home_ajax_news.seam"><span><h:outputText
					value="#{messages['title.news']}" /></span></a></li>
				<li class="ui-corner-left"><a href="home_ajax_dogadjaji.seam"><span><h:outputText
					value="#{messages['title.dogadjaji']}" /></span></a></li>
				<li class="ui-corner-left"><a href="home_ajax_dojmovi.seam"><span><h:outputText
					value="#{messages['title.dojmovi']}" /></span></a></li>
				<li class="ui-corner-left"><a href="home_ajax_objave.seam"><span><h:outputText
					value="#{messages['title.from_web']}" /></span></a></li>
			</ul>
			<div id="tabs-1">
				<h:form id="quickSearchForm">
					<a4j:region renderRegionOnly="true">
						<ctg:status />
						<h:panelGrid columns="3" id="quickSearch" width="80%">
							<s:decorate id="tipObjektaDecoration"
								template="/templates/display.xhtml">
								<ui:define name="label">#{messages['label.object.type']}</ui:define>
								<h:selectOneMenu id="tipObjekta" styleClass="field"
									value="#{searchParameters.tipObjekta}">
									<s:selectItems var="to" value="#{tipoviObjekata}"
										label="#{messages[stringUtil.merge(to.idTipaObjekta)]}"></s:selectItems>
									<s:convertEntity />
								</h:selectOneMenu>
							</s:decorate>
							<s:decorate id="categoryDecoration"
								template="/templates/display.xhtml">
								<ui:define name="label">#{messages['label.categories']}</ui:define>
								<h:selectOneMenu id="brojZvjezdica" styleClass="field"
									value="#{searchParameters.brojZvjezdica}">
									<f:selectItem itemLabel="#{messages['label.choose']}"
										itemValue="" />
									<f:selectItem itemLabel="1" itemValue="1" />
									<f:selectItem itemLabel="2" itemValue="2" />
									<f:selectItem itemLabel="3" itemValue="3" />
									<f:selectItem itemLabel="4" itemValue="4" />
									<f:selectItem itemLabel="5" itemValue="5" />
								</h:selectOneMenu>
							</s:decorate>
							<s:decorate id="ratingDecoration"
								template="/templates/display.xhtml">
								<ui:define name="label">#{messages['label.ratings']}</ui:define>
								<h:selectOneMenu id="rating" styleClass="field"
									value="#{searchParameters.ocjena}">
									<f:selectItem itemLabel="#{messages['label.choose']}"
										itemValue="" />
									<f:selectItem itemLabel="1 =>" itemValue="1" />
									<f:selectItem itemLabel="2 =>" itemValue="2" />
									<f:selectItem itemLabel="3 =>" itemValue="3" />
									<f:selectItem itemLabel="4 =>" itemValue="4" />
									<f:selectItem itemLabel="5 =>" itemValue="5" />
									<f:selectItem itemLabel="6 =>" itemValue="6" />
									<f:selectItem itemLabel="7 =>" itemValue="7" />
									<f:selectItem itemLabel="8 =>" itemValue="8" />
									<f:selectItem itemLabel="9 =>" itemValue="9" />
									<f:selectItem itemLabel="= 10" itemValue="10" />
								</h:selectOneMenu>
							</s:decorate>
							<s:decorate id="mjestoObjektaDecoration"
								template="/templates/edit.xhtml">
								<ui:define name="label">
									<h:outputText value="#{messages['label.place']}:" />
								</ui:define>
								<h:selectOneMenu id="mjesto" styleClass="field"
									value="#{searchParameters.mjesto}">
									<s:selectItems value="#{mjestaByObjekti}" var="m"
										label="#{m.naziv}"
										noSelectionLabel="#{messages['label.choose']}" />
									<s:convertEntity />
								</h:selectOneMenu>
							</s:decorate>
							<s:decorate template="/templates/edit.xhtml"
								rendered="#{tipObjekta == 3}">
								<ui:define name="label">
									<h:outputText value="#{messages['label.rooms.number']}:" />
								</ui:define>
								<rich:inputNumberSpinner maxValue="15" minValue="1"
									value="#{searchParameters.sobe}"></rich:inputNumberSpinner>
							</s:decorate>
							<s:decorate template="/templates/edit.xhtml">
								<ui:define name="label">
									<h:outputText value="#{messages['label.number.guests']}:" />
								</ui:define>
								<h:selectOneMenu styleClass="field"
									value="#{searchParameters.osobe}">
									<f:selectItem itemLabel="#{messages['label.choose']}"
										itemValue="" />
									<f:selectItem itemLabel="1" itemValue="1" />
									<f:selectItem itemLabel="2" itemValue="2" />
									<f:selectItem itemLabel="3" itemValue="3" />
									<f:selectItem itemLabel="4" itemValue="4" />
									<f:selectItem itemLabel="5" itemValue="5" />
									<f:selectItem itemLabel="6" itemValue="6" />
									<f:selectItem itemLabel="7" itemValue="7" />
									<f:selectItem itemLabel="8" itemValue="8" />
									<f:selectItem itemLabel="9" itemValue="9" />
									<f:selectItem itemLabel="10" itemValue="10" />
									<f:selectItem itemLabel="15" itemValue="15" />
									<f:selectItem itemLabel="20" itemValue="20" />
									<f:selectItem itemLabel="50" itemValue="50" />
								</h:selectOneMenu>
							</s:decorate>
							<s:decorate template="/templates/edit.xhtml">
								<ui:define name="label">
									<h:outputText value="#{messages['label.max.price']}:" />
								</ui:define>
								<h:inputText styleClass="field"
									value="#{searchParameters.maxCijena}" id="maxCijena">
								
								</h:inputText>
							</s:decorate>
							<a4j:commandButton value="#{messages['label.search']}" 
								styleClass="submit" action="results" reRender="quickSearch">
							</a4j:commandButton>
						</h:panelGrid>
						<br/>
						<s:link view="/guides/objekti/searchSmjestaj.xhtml" value="#{messages['label.advanced_accomodation_search']}" propagation="none" styleClass="special1"></s:link>
						<h:messages styleClass="error" globalOnly="true" />
					</a4j:region>
				</h:form>
			</div>				
		<br class="clearb"/>
	</div>
</div>
  

</ui:component>
